import os

def get_project_path():
    """
    获取项目目录
    :return:
    """
    project_name = 'python_pratice'
    # 获取当前脚本（即调用该函数的.py文件）的目录路径
    file_path = os.path.dirname(__file__)
    return file_path[: file_path.find(project_name)+len(project_name)]
def sep(path,add_sep_before=False,add_sep_after=False):
    all_path = os.sep.join(path)
    if add_sep_before:
        all_path = os.sep +all_path
    if add_sep_after:
        all_path = all_path + os.sep
    return all_path


if __name__ == '__main__':
    print(get_project_path())